EMT Practice Test

1. Question Content...


Question List

Question1: On a cluster running MapReduce v1 (MRv1), a TaskTracker heartbeats into the JobTracker on your cluster, and alerts the JobTracker it has an open map task slot.
What determines how the JobTracker assigns each map task to a TaskTracker?

Question2: In the reducer, the MapReduce API provides you with an iterator over Writable values. What does calling the next () method return?

Question3: All keys used for intermediate output from mappers must:

Question4: You write MapReduce job to process 100 files in HDFS. Your MapReduce algorithm uses TextInputFormat: the mapper applies a regular expression over input values and emits key-values pairs with the key consisting of the matching text, and the value containing the filename and byte offset.
Determine the difference between setting the number of reduces to one and settings the number of reducers to zero.

Question5: Given a directory of files with the following structure: line number, tab character, string:
Example:
1 abialkjfjkaoasdfjksdlkjhqweroij
2 kadfjhuwqounahagtnbvaswslmnbfgy
3 kjfteiomndscxeqalkzhtopedkfsikj
You want to send each line as one record to your Mapper. Which InputFormat should you use to complete the line: conf.setInputFormat (____.class) ; ?

Question6: To process input key-value pairs, your mapper needs to lead a 512 MB data file in memory. What is the best way to accomplish this?

Question7: For each intermediate key, each reducer task can emit:

Question8: Which process describes the lifecycle of a Mapper?

Question9: When can a reduce class also serve as a combiner without affecting the output of a MapReduce program?

Question10: What types of algorithms are difficult to express in MapReduce v1 (MRv1)?

Question11: Which best describes what the map method accepts and emits?

Question12: The Hadoop framework provides a mechanism for coping with machine issues such as faulty configuration or impending hardware failure. MapReduce detects that one or a number of machines are performing poorly and starts more copies of a map or reduce task. All the tasks run simultaneously and the task finish first are used. This is called:

Question13: In a large MapReduce job with m mappers and n reducers, how many distinct copy operations will there be in the sort/shuffle phase?

Question14: You need to create a job that does frequency analysis on input data. You will do this by writing a Mapper that uses TextInputFormat and splits each value (a line of text from an input file) into individual characters.
For each one of these characters, you will emit the character as a key and an InputWritable as the value.
As this will produce proportionally more intermediate data than input data, which two resources should you expect to be bottlenecks?

Question15: What data does a Reducer reduce method process?

Question16: Analyze each scenario below and indentify which best describes the behavior of the default partitioner?

Question17: When can a reduce class also serve as a combiner without affecting the output of a MapReduce program?

Question18: You have written a Mapper which invokes the following five calls to the OutputColletor.collect method:
output.collect (new Text ("Apple"), new Text ("Red") ) ;
output.collect (new Text ("Banana"), new Text ("Yellow") ) ;
output.collect (new Text ("Apple"), new Text ("Yellow") ) ;
output.collect (new Text ("Cherry"), new Text ("Red") ) ;
output.collect (new Text ("Apple"), new Text ("Green") ) ;
How many times will the Reducer's reduce method be invoked?

Question19: A client application creates an HDFS file named foo.txt with a replication factor of 3. Identify which best describes the file access rules in HDFS if the file has a single block that is stored on data nodes A, B and C?

Question20: Determine which best describes when the reduce method is first called in a MapReduce job?

Question21: Indentify which best defines a SequenceFile?

Question22: Table metadata in Hive is:

Question23: In a MapReduce job with 500 map tasks, how many map task attempts will there be?

Question24: A combiner reduces:

Question25: Workflows expressed in Oozie can contain:

Question26: Which best describes how TextInputFormat processes input files and line breaks?

Question27: In a MapReduce job, you want each of your input files processed by a single map task. How do you configure a MapReduce job so that a single map task processes each input file regardless of how many blocks the input file occupies?

Question28: You need to perform statistical analysis in your MapReduce job and would like to call methods in the Apache Commons Math library, which is distributed as a 1.3 megabyte Java archive (JAR) file. Which is the best way to make this library available to your MapReducer job at runtime?

Question29: What is the disadvantage of using multiple reducers with the default HashPartitioner and distributing your workload across you cluster?

Question30: In a MapReduce job, the reducer receives all values associated with same key. Which statement best describes the ordering of these values?